package com.njlime.cms.repository.sys;

import com.njlime.cms.entities.Channel;
import com.njlime.cms.entities.ChannelColumn;
import com.njlime.core.base.repository.impl.BaseDaoImpl;
import com.njlime.core.helper.PageBean;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by Dean on 2017-7-27.
 */
@Repository
public class ChannelColumnDaoImpl extends BaseDaoImpl<ChannelColumn> {


    /**
     * 更新
     *
     * @param channelId  频道id
     * @return
     */
    public void deleteAll(int channelId,int unitId) {
        StringBuilder sb = new StringBuilder();
        List<Object> arrList = new ArrayList<Object>();
        sb.append("delete  from t_channel_column  ");
        sb.append(" where channel_id = ? and unit_id = ?");
        arrList.add(channelId);
        arrList.add(unitId);
        updateJdbc(sb.toString(), arrList);
    }


}
